home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
samdu220.zip
/
SABDU001.TXT
< prev
next >
Wrap
Text File
|
1993-04-01
|
67KB
|
1,892 lines
>>SABDU001
------------------ SABDU001.DLL API: OverView ------------------------
Dynamic Load Library Routines
The SABDU001 Dynameic Load Library contains a set of routines for
creating and manipulating diskette type objects. The sets of routines
are:
DiskDrive This are the ones that are usually used.
They operate at the logical level.
DDrive Drive object
FDrive File object
MDrive Memory object
VDrive Virtual object
DebugOut Debugging routines
HandleStatus Callback routine used to communicate
progress during long running operations
(i.e. formatting a diskette) and status.
>>DDrive
------------------ SABDU001.DLL API: DDrive objects ------------------
A DDrive (Diskette Drive) is a specialized version of the VDrive
(Virtual Drive). It is an object that represents a physical drive.
The following functions are available to manipulate it:
DDriveCreate Creates a DDrive object
DDriveDelete Deletes a DDrive object
DDriveFormatTrack Formats a track
DDriveForceReset Issues a reset to the drive
DDriveReadSectors Reads a group of sectors from the drive
DDriveReset Issues a reset to the drive if it was used
DDriveSetRead Sets up for reading from the drive
DDriveSetWrite Sets up for writing to the drive
DDriveWriteSectors Writes a group of sectors to the drive
>>DDriveCreate
------------------ SABDU001.DLL API: DDriveCreate --------------------
VOID far * FAR PASCAL DDriveCreate (
char cDrive,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
Creates a DDrive object associated with drive cDrive and returns a
pointer to it.
lpfnNewHandleStatus points to a callback routine that handles event
notifications including errors.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
>>DDriveDelete
------------------ SABDU001.DLL API: DDriveDelete --------------------
VOID FAR PASCAL DDriveDelete (
pDDrive
)
Deletes the DDrive object pointed to by pDDrive.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveDelete ( pDriveA ) ;
pDriveA = NULL ;
>>DDriveSetRead
------------------ SABDU001.DLL API: DDriveSetRead -------------------
UINT FAR PASCAL DDriveSetRead (
VOID far *pDDrive,
UINT nTempType,
UINT nCylinders
)
Prepares the DDrive object pointed to by pDDrive for reading.
nTempType defines the type of diskette expected:
FD0360 FD0720 FD1200 FD1440 FD2880
nCylinders defines the number of cylinders.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveSetRead ( pDriveA, FD0360, NULL ) ;
>>DDriveSetWrite
------------------ SABDU001.DLL API: DDriveSetWrite ------------------
UINT FAR PASCAL DDriveSetWrite (
VOID far *pDDrive,
UINT nTempType,
UINT nCylinders
)
Prepares the DDrive object pointed to by pDDrive for writing.
nTempType defines the type of diskette expected:
FD0360 FD0720 FD1200 FD1440 FD2880
nCylinders defines the number of cylinders.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveSetWrite ( pDriveA, FD0360, NULL ) ;
>>DDriveReset
------------------ SABDU001.DLL API: DDriveReset ---------------------
UINT FAR PASCAL DDriveReset (
VOID far *pDDrive
)
Resets the DDrive object pointed to by pDDrive.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveReset ( pDriveA ) ;
>>DDriveForceReset
------------------ SABDU001.DLL API: DDriveForceReset ----------------
UINT FAR PASCAL DDriveForceReset (
VOID far *pDDrive
)
Resets the DDrive object pointed to by pDDrive.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveForceReset ( pDriveA ) ;
>>DDriveFormatTrack
------------------ SABDU001.DLL API: DDriveFormatTrack ---------------
UINT FAR PASCAL DDriveForceReset (
VOID far *pDDrive,
UNIT nCylinder,
UNIT nHead
)
Formats the track pointed to by DDrive object pointer
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveFormatTrack ( pDriveA, nCylinder, nHead ) ;
>>DDriveReadSectors
------------------ SABDU001.DLL API: DDriveReadSectors ---------------
UINT FAR PASCAL DDriveReadSectors (
VOID far *pDDrive,
UNIT nCylinder,
UNIT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpcBuffer
)
Reads a group of sectors from the drive pointerd to by pDDrive
nCylinder Cylinder to read from
nHead Head to read with
nSector Starting sector
nCount Number of sectors to read
lpcBuffer Buffer to contain the data read.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveReadSectors ( pDriveA, nCylinder, nHead, nSector,
nCount, lpcBuffer ) ;
>>DDriveWriteSectors
------------------ SABDU001.DLL API: DDriveWriteSectors --------------
UINT FAR PASCAL DDriveWriteSectors (
VOID far *pDDrive,
UNIT nCylinder,
UNIT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpcBuffer
)
Writes a group of sectors from the drive pointerd to by pDDrive
nCylinder Cylinder to read from
nHead Head to read with
nSector Starting sector
nCount Number of sectors to read
lpcBuffer Buffer to contain the data read.
Example:
VOID far *pDriveA ;
pDriveA = DDriveCreate ( 'A' ) ;
...
DDriveWriteSectors ( pDriveA, nCylinder, nHead, nSector,
nCount, lpcBuffer ) ;
>>DebugOut
------------------ SABDU001.DLL API: DebugOut objects ----------------
A DebugOut object is a debugging aid:
The following functions are available to manipulate it:
DebugOutCreate Creates debug object
DebugOutOutputIf Outputs a message
DebugOutScan Scans command line for control information
DebugOutczDebugBuffer Returns pointer to debug buffer
>>DebugOutCreate
------------------ SABDU001.DLL API: DebugOutCreate ------------------
VOID far * FAR PASCAL CEXPORT DebugOutCreate (
LPCSTR lpczCmdLine
) ;
Command line:
[/Dxxxxxxxx [/Myyyyyyyy] [/Ffilename]]
xxxxxxxx is a hex string each bit of which can be used to control
the sending of trace messages
yyyyyyyy is a hex string each bit of which indicates if a control
message should be displayed in a MessageBox
filename trace file name
Returns a pointer to a debug object.
>>DebugOutScan
------------------ SABDU001.DLL API: DebugOutScan --------------------
VOID FAR PASCAL CEXPORT DebugOutScan (
LPCSTR lpczCmdLine
) ;
Command line:
[/Dxxxxxxxx [/Myyyyyyyy] [/Ffilename]]
xxxxxxxx is a hex string each bit of which can be used to control
the sending of trace messages
yyyyyyyy is a hex string each bit of which indicates if a control
message should be displayed in a MessageBox
filename trace file name
>>DebugOutOutputIf
------------------ SABDU001.DLL API: DebugOutOutputIf ----------------
VOID FAR PASCAL CEXPORT DebugOutOutputIf (
unsigned long ulDFlag,
LPCSTR lpczText,
LPCSTR lpczTitle,
UINT nMFlags
) ;
ulDFlag is matched with /D and /M from command line to determine if
message should be output to trace or displayed in a MessageBox.
lpczText pointer to text of trace message
lpczTitle pointer to title of trace message
nMFlags MessageBox flags
>>DebugOutczDebugBuffer
------------------ SABDU001.DLL API: DebugOutczDebugBuffer -----------
char far * FAR PASCAL CEXPORT DebugOutczDebugBuffer (
VOID
) ;
Returns pointer to debug buffer that can be used to format messages.
>>DebugOutDebugFlags
------------------ SABDU001.DLL API: DebugOutczDebugBuffer -----------
char far * FAR PASCAL CEXPORT DebugOutDebugFlags (
VOID
) ;
Returns debug flags.
>>DiskDrive
------------------ SABDU001.DLL API: DiskDrive objects ---------------
A DiskDrive is a wrapper that encapsolates a virtual (VDrive) object
and provides all of the functions needed to manipulate it
The following functions are available to manipulate it:
DiskDriveCompare Compares two DiskDrive objects
DiskDriveCopy Copies a DiskDrive object
DiskDriveCreateDrive Creates a DiskDrive object
DiskDriveCreateFile Creates a DiskDrive object
DiskDriveCreateMemory Creates a DiskDrive object
DiskDriveCreateVDrive Creates a DiskDrive object
DiskDriveDelete Deletes a DiskDrive object
DiskDriveForceReset Forces a reset of the assocated VDrive
DiskDriveFormat Formats a DiskDrive object
DiskDriveFormatTrack Formats a track
DiskDriveGetVolumeSerial Gets the volume serial
DiskDriveHasData Returns TRUE if object valid
DiskDriveIsTruncated Returns TRUE if object is truncated
DiskDriveLetter Returns DiskDrive object letter
DiskDriveReadSectors Reads a group of sectors from DiskDrive
DiskDriveReset Resets the associated VDrive if used
DiskDriveSetRead Sets the associated VDrive for reading
DiskDriveSetType Sets the type (density) of VDrive
DiskDriveSetVolumeSerial Sets the volume serial
DiskDriveSetWrite Sets the associated VDrive for writing
DiskDriveSetWriteFormatOption Turns on/off WriteFormatOption
DiskDriveSetWriteVerifyOption Turns on/off WriteVerifyOption
DiskDriveTruncate Sets truncation mode on
DiskDriveTruncateReverse Sets truncation mode off
DiskDriveType Returns type (density)
DiskDriveUsedCylinders Returns cylinders used
DiskDriveUsedHeads Returns heads used
DiskDriveUsedSectorSize Returns sector size
DiskDriveUsedSectors Returns sectors used
DiskDriveWriteBootSector Writes boot sector of DiskDrive
DiskDriveWriteSectors Writes a group of sectors to DiskDrive
>>DiskDriveCreateDrive
------------------ SABDU001.DLL API: DiskDriveCreateDrive ------------
UINT FAR PASCAL DiskDriveCreateDrive (
char cDrive
UINT nType,
UINT nCylinders,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
nType = FD0360
FD0720
FD1200
FD1200H
FD1440
FD1440H
FD2880
lpfnNewHandleStatus points to a callback routine that handles event
notifications including errors.
Creates a DiskDrive object using a physical drive as the base for the
VDrive object within it.
Returns pointer to DiskDrive object.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive (
'A',
FD1200,
80,
lpfnNewHandleStatus
)
>>DiskDriveCreateMemory
------------------ SABDU001.DLL API: DiskDriveCreateMemory -----------
UINT FAR PASCAL DiskDriveCreateMemory (
UINT nMemory
UINT nType,
UINT nCylinders,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
nType = FD0360
FD0720
FD1200
FD1200H
FD1440
FD1440H
FD2880
lpfnNewHandleStatus points to a callback routine that handles event
notifications including errors.
Creates a DiskDrive object using a memory object as the base for the
VDrive object within it.
Returns pointer to DiskDrive object.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateMemory (
1,
FD1200,
80,
lpfnNewHandleStatus
)
>>DiskDriveCreateFile
------------------ SABDU001.DLL API: DiskDriveCreateFile -------------
UINT FAR PASCAL DiskDriveCreateFile (
LPCSTR lpczFileName,
LPCSTR lpczApplicationTitle,
LPCSTR lpczVersion,
UINT nType,
UINT nCylinders,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
nType = FD0360
FD0720
FD1200
FD1200H
FD1440
FD1440H
FD2880
lpfnNewHandleStatus points to a callback routine that handles event
notifications including errors.
Creates a DiskDrive object using a file object as the base for the
VDrive object within it.
Returns pointer to DiskDrive object.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateFile (
"FileName.SD",
"SAB Diskette Utility",
"2.00",
FD1200,
80,
lpfnNewHandleStatus
)
>>DiskDriveCreateVDrive
------------------ SABDU001.DLL API: DiskDriveCreateVDrive -----------
UINT FAR PASCAL DiskDriveCreateVDrive (
VOID far * pVDrive,
UINT nType,
UINT nCylinders,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
nType = FD0360
FD0720
FD1200
FD1200H
FD1440
FD1440H
FD2880
lpfnNewHandleStatus points to a callback routine that handles event
notifications including errors.
Creates a DiskDrive object using a virtual drive object as the
base for the VDrive object within it.
Returns pointer to DiskDrive object.
Example:
VOID far *pDiskDriveA ;
VOID far *pVDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pVDriveA = DDriveDrive ( 'A' ) ;
pDiskDriveA = DiskDriveCreateVDrive (
pVDriveA,
FD1200,
80,
lpfnNewHandleStatus
)
>>DiskDriveDelete
------------------ SABDU001.DLL API: DiskDriveDelete -----------------
UINT FAR PASCAL DiskDriveDelete (
VOID far * pCDrive,
)
Deletes a DiskDrive object.
Example:
VOID far *pDiskDriveA ;
VOID far *pVDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pVDriveA = DDriveDrive ( 'A' ) ;
pDiskDriveA = DiskDriveCreateVDrive ( pVDriveA )
...
DiskDriveDelete ( pDiskDriveA ) ;
pDiskDriveA = NULL ;
>>DiskDriveCopy
------------------ SABDU001.DLL API: DiskDriveCopy -------------------
UINT FAR PASCAL DiskDriveCopy (
VOID far * pDiskDriveTarget,
VOID far * pDiskDriveSource
)
Copies a DiskDrive object ;
Example:
VOID far *pDiskDriveA ;
VOID far *pDiskDriveB ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
pDiskDriveB = DiskDriveCreateDrive ( 'B',
DiskDriveType( pDiskDriveA ),
0, lpfnNewHandleStatus ) ;
DiskDriveCopy ( pDiskDriveB, pDiskDriveA ) ;
>>DiskDriveCompare
------------------ SABDU001.DLL API: DiskDriveCompare ----------------
UINT FAR PASCAL DiskDriveCompare (
VOID far * pDiskDriveTarget,
VOID far * pDiskDriveSource
)
Compares two DiskDrive objects.
Returns TRUE if they are the same.
Example:
VOID far *pDiskDriveA ;
VOID far *pDiskDriveB ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
pDiskDriveB = DiskDriveCreateDrive ( 'B',
DiskDriveType( pDiskDriveA ),
0, lpfnNewHandleStatus ) ;
DiskDriveCompare ( pDiskDriveB, pDiskDriveA ) ;
>>DiskDriveFormatTrack
------------------ SABDU001.DLL API: DiskDriveFormatTrack ------------
UINT FAR PASCAL DiskDriveFormatTrack (
VOID far * pDiskDrive,
UINT nCylinder,
UINT nHead,
lpfnHANDLESTATUS lpfnHandleStatus
)
Formats a track.
Returns FALSE if successfull
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1200, 80,
lpfnNewHandleStatus ) ;
DiskDriveFormatTrack ( pDiskDriveB, 0, 1,
lpfnNewHandleStatus ) ;
>>DiskDriveReadSectors
------------------ SABDU001.DLL API: DiskDriveReadSectors ------------
UINT FAR PASCAL DiskDriveReadSectors (
VOID far * pDiskDrive,
UINT nCylinder,
UINT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpbyBuffer,
lpfnHANDLESTATUS lpfnHandleStatus
)
Reads a group of sectors.
Returns FALSE if successfull
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
DiskDriveReadSectors ( pDiskDriveA, 0, 1, 0, 18,
lpfnNewHandleStatus ) ;
>>DiskDriveWriteSectors
------------------ SABDU001.DLL API: DiskDriveWriteSectors -----------
UINT FAR PASCAL DiskDriveWriteSectors (
VOID far * pDiskDrive,
UINT nCylinder,
UINT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpbyBuffer,
lpfnHANDLESTATUS lpfnHandleStatus
)
Writes a group of sectors.
Returns FALSE if successfull
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
DiskDriveWriteSectors ( pDiskDriveA, 0, 1, 0, 18,
lpfnNewHandleStatus ) ;
>>DiskDriveLetter
------------------ SABDU001.DLL API: DiskDriveWriteLetter ------------
UINT FAR PASCAL DiskDriveLetter (
VOID far * pDiskDrive,
)
Returns letter of virtual drive.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
...
cDriveLetter = DiskDriveLetter ( pDiskDriveA ) ;
>>DiskDriveSetRead
------------------ SABDU001.DLL API: DiskDriveSetRead ---------------
UINT FAR PASCAL DiskDriveSetRead (
VOID far * pDiskDrive,
UINT nTempType,
UINT nCylinders
)
Sets contained virtual drive for reading.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveSetRead ( pDiskDriveA, nTempType, nCylinders ) ;
>>DiskDriveSetWrite
------------------ SABDU001.DLL API: DiskDriveSetWrite---------------
UINT FAR PASCAL DiskDriveSetWrite (
VOID far * pDiskDrive,
UINT nTempType,
UINT nCylinders
)
Sets contained virtual drive for writing.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveSetWrite ( pDiskDriveA, nTempType, nCylinders ) ;
>>DiskDriveSetWriteFormatOption
------------------ SABDU001.DLL API: DiskDriveSetWriteFormatOption --
UINT FAR PASCAL DiskDriveSetWriteFormatOption (
VOID far * pDiskDrive,
UINT nWriteFormatOptionNew
)
nWriteFormatOptionNew
1 AUTOMATIC
2 ALWAYS
3 NEVER
4 FAST
Sets write format option.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveSetWriteFormatOption ( pDiskDriveA, AUTOMATIC ) ;
>>DiskDriveSetWriteVerifyOption
------------------ SABDU001.DLL API: DiskDriveSetWriteVerifyOption --
UINT FAR PASCAL DiskDriveSetWriteVerifyOption (
VOID far * pDiskDrive,
BOOL bWriteVerifyOptionNew
)
Sets write verify option.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveSetWriteVerifyOption ( pDiskDriveA, TRUE ) ;
>>DiskDriveReset
------------------ SABDU001.DLL API: DiskDriveReset ------------------
UINT FAR PASCAL DiskDriveReset (
VOID far * pDiskDrive
)
Resets virtual drive
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveReset ( pDiskDriveA ) ;
>>DiskDriveForceReset
------------------ SABDU001.DLL API: DiskDriveForceReset -------------
UINT FAR PASCAL DiskDriveForceReset (
VOID far * pDiskDrive
)
Forces reset of virtual drive
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveForceReset ( pDiskDriveA ) ;
>>DiskDriveType
------------------ SABDU001.DLL API: DiskDriveType -------------------
UINT FAR PASCAL DiskDriveType (
VOID far * pDiskDrive
)
Returns type ( density ).
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
UINT nType ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
nType = DiskDriveType ( pDiskDriveA ) ;
>>DiskDriveHasData
------------------ SABDU001.DLL API: DiskDriveHasData ----------------
UINT FAR PASCAL DiskDriveHasData (
VOID far * pDiskDrive
)
Returns TRUE if DiskDrive is valid object.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
if ( DiskDriveHasData ( pDiskDriveA ) ) ...;
>>DiskDriveIsTruncated
------------------ SABDU001.DLL API: DiskDriveIsTruncated ------------
UINT FAR PASCAL DiskDriveIsTruncated (
VOID far * pDiskDrive
)
Returns TRUE if DiskDrive is truncated.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
if ( DiskDriveIsTruncated ( pDiskDriveA ) ) ...;
>>DiskDriveFormat
------------------ SABDU001.DLL API: DiskDriveFormat -----------------
UINT FAR PASCAL DiskDriveFormat (
VOID far * pDiskDrive,
LPCSTR lpczVolumeSerial,
UNIT nFormatOption,
LPBYTE lpbyBootSector,
lpfnHANDLESTATUS lpfnHandleStatus
)
Returns FALSE if successfull.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
UINT nType ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveFormat ( pDiskDriveA, "VOL 1", FORMATFAST, NULL, NULL ) ;
>>DiskDriveSetType
------------------ SABDU001.DLL API: DiskDriveSetType ----------------
UINT FAR PASCAL DiskDriveSetType (
VOID far * pDiskDrive,
UINT nNewType
)
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveSetType ( pDiskDriveA, FD1200 ) ;
>>DiskDriveUsedCylinders
------------------ SABDU001.DLL API: DiskDriveUsedCylinders ----------
UINT FAR PASCAL DiskDriveUsedCylinders (
VOID far * pDiskDrive
)
Returns number of cylinders.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
UINT nCylinder ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
nCylinder = DiskDriveUsedCylinders ( pDiskDriveA ) ;
>>DiskDriveUsedHeads
------------------ SABDU001.DLL API: DiskDriveHeads ------------------
UINT FAR PASCAL DiskDriveUsedHeads (
VOID far * pDiskDrive
)
Returns number of heads.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
UINT nHeads ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
nHeads = DiskDriveUsedHeads ( pDiskDriveA ) ;
>>DiskDriveUsedSectors
------------------ SABDU001.DLL API: DiskDriveUsedSectors ------------
UINT FAR PASCAL DiskDriveUsedSectors (
VOID far * pDiskDrive
)
Returns number of sectors in a track.
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
UINT nSectors ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
nSectors = DiskDriveUsedSectors ( pDiskDriveA ) ;
>>DiskDriveUsedSectorSize
------------------ SABDU001.DLL API: DiskDriveUsedSectorSize----------
UINT FAR PASCAL DiskDriveUsedSectorSize (
VOID far * pDiskDrive
)
Returns sector size.
Example:
VOID far *pDiskDriveA ;
LPSTR *lpczOldVolumeSerial ;
FARPROC lpfnNewHandleStatus ;
UINT nSectorSize ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
nSectorSize = DiskDriveUsedSectorSize ( pDiskDriveA ) ;
>>DiskDriveGetVolumeSerial
------------------ SABDU001.DLL API: DiskDriveGetVolumeSerial --------
UINT FAR PASCAL DiskDriveGetVolumeSerial (
VOID far * pDiskDrive,
LPSTR lpczOldVolumeSerial
)
Example:
VOID far *pDiskDriveA ;
char cDriveLetter ;
FARPROC lpfnNewHandleStatus ;
UINT nType ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveGetVolumeSerial ( pDiskDriveA, lpczOldVolumeSerial ) ;
>>DiskDriveSetVolumeSerial
------------------ SABDU001.DLL API: DiskDriveSetVolumeSerial --------
UINT FAR PASCAL DiskDriveSetVolumeSerial (
VOID far * pDiskDrive,
LPSTR lpczNewVolumeSerial
)
Returns FALSE if successfull.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveSetVolumeSerial ( pDiskDriveA, "Vol 1" ) ;
>>DiskDriveTruncate
------------------ SABDU001.DLL API: DiskDriveTruncate ---------------
UINT FAR PASCAL DiskDriveTruncate (
VOID far * pDiskDrive
)
Turns on truncation.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveTypeTruncate ( pDiskDriveA ) ;
>>DiskDriveTruncateRevers
------------------ SABDU001.DLL API: DiskDriveTruncateReverse --------
UINT FAR PASCAL DiskDriveTruncateReverse (
VOID far * pDiskDrive
)
Turns off truncation.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveTruncateReverse ( pDiskDriveA ) ;
>>DiskDriveWriteBootSector
------------------ SABDU001.DLL API: DiskDriveWriteBootSector --------
UINT FAR PASCAL DiskDriveWriteBootSector (
VOID far * pDiskDrive,
lpbyModelBootSector,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
Returns false if successfull.
Example:
VOID far *pDiskDriveA ;
FARPROC lpfnNewHandleStatus ;
lpfnNewHandleStatus = MakeProcInstance ( hInstance,
NewHandleStatus ) ;
pDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
lpfnNewHandleStatus ) ;
...
DiskDriveTypeWriteBootSector ( pDiskDriveA, NULL, NULL ) ;
>>FDrive
------------------ SABDU001.DLL API: FDrive objects ------------------
A FDrive (File Drive) is a specialized version of the VDrive
(Virtual Drive). It is an object that represents a diskette image
file.
The following functions are available to manipulate it:
FDriveCreate Creates a FDrive object
FDriveDelete Deletes a FDrive object
FDriveForceReset Issues a reset to the drive
FDriveFormatTrack Formats a track
FDriveReadSectors Reads a group of sectors from the drive
FDriveReset Issues a reset to the drive if it was used
FDriveSetRead Sets up for reading from the drive
FDriveSetWrite Sets up for writing to the drive
FDriveWriteSectors Writes a group of sectors to the drive
>>FDriveCreate
------------------ SABDU001.DLL API: FDriveCreate --------------------
VOID far * FAR PASCAL FDriveCreate (
LPCSTR lpczFileName,
LPCSTR lpczApplicationTitle,
LPCSTR lpczVersion,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
Creates a FDrive object associated with drive cDrive and returns a
pointer to it.
lpfnNewHandleStatus points to a callback routine that handles event
notifications including errors.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10",
lpfnHandleStatus
) ;
>>FDriveDelete
------------------ SABDU001.DLL API: FDriveDelete --------------------
VOID FAR PASCAL FDriveDelete (
pFDrive
)
Deletes the FDrive object pointed to by pFDrive.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveDelete ( pDrive ) ;
pDrive = NULL ;
>>FDriveSetRead
------------------ SABDU001.DLL API: FDriveSetRead -------------------
UINT FAR PASCAL FDriveSetRead (
VOID far *pFDrive,
UINT nTempType,
UINT nCylinders
)
Prepares the FDrive object pointed to by pFDrive for reading.
nTempType defines the type of diskette expected:
FD0360 FD0720 FD1200 FD1440 FD2880
nCylinders defines the number of cylinders.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveSetRead ( pDrive, FD0360, NULL ) ;
>>FDriveSetWrite
------------------ SABDU001.DLL API: FDriveSetWrite ------------------
UINT FAR PASCAL FDriveSetWrite (
VOID far *pFDrive,
UINT nTempType,
UINT nCylinders
)
Prepares the FDrive object pointed to by pFDrive for writing.
nTempType defines the type of diskette expected:
FD0360 FD0720 FD1200 FD1440 FD2880
nCylinders defines the number of cylinders.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveSetWrite ( pDrive, FD0360, NULL ) ;
>>FDriveReset
------------------ SABDU001.DLL API: FDriveReset ---------------------
UINT FAR PASCAL FDriveReset (
VOID far *pFDrive
)
Resets the FDrive object pointed to by pFDrive.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveReset ( pDrive ) ;
>>FDriveForceReset
------------------ SABDU001.DLL API: FDriveForceReset ----------------
UINT FAR PASCAL FDriveForceReset (
VOID far *pFDrive
)
Resets the FDrive object pointed to by pFDrive.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveForceReset ( pDrive ) ;
>>FDriveFormatTrack
------------------ SABDU001.DLL API: FDriveFormatTrack ---------------
UINT FAR PASCAL FDriveForceReset (
VOID far *pFDrive,
UNIT nCylinder,
UNIT nHead
)
Formats the track pointed to by FDrive object pointer
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveFormatTrack ( pDrive, nCylinder, nHead ) ;
>>FDriveReadSectors
------------------ SABDU001.DLL API: FDriveReadSectors ---------------
UINT FAR PASCAL FDriveReadSectors (
VOID far *pFDrive,
UNIT nCylinder,
UNIT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpcBuffer
)
Reads a group of sectors from the drive pointerd to by pFDrive
nCylinder Cylinder to read from
nHead Head to read with
nSector Starting sector
nCount Number of sectors to read
lpcBuffer Buffer to contain the data read.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveReadSectors ( pDrive, nCylinder, nHead, nSector,
nCount, lpcBuffer ) ;
>>FDriveWriteSectors
------------------ SABDU001.DLL API: FDriveWriteSectors --------------
UINT FAR PASCAL FDriveWriteSectors (
VOID far *pFDrive,
UNIT nCylinder,
UNIT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpcBuffer
)
Writes a group of sectors from the drive pointerd to by pFDrive
nCylinder Cylinder to read from
nHead Head to read with
nSector Starting sector
nCount Number of sectors to read
lpcBuffer Buffer to contain the data read.
Example:
VOID far *pDriveA ;
pDrive = FDriveCreate (
"MyFileName",
"SAB Diskette Utility",
"2.10"
) ;
...
FDriveWriteSectors ( pDrive, nCylinder, nHead, nSector,
nCount, lpcBuffer ) ;
>>HandleStatus
------------------ SABDU001.DLL Callback: HandleStatus ---------------
typedef int (FAR PASCAL __export * lpfnHANDLESTATUS)(
UINT nStatus1,
UINT nStatus2,
UINT nParam1,
UINT nParam2,
LONG lParam1,
LONG lParam2
) ;
int FAR PASCAL __export HandleStatus (
UINT nStatus1,
UINT nStatus2,
UINT nParam1,
UINT nParam2,
LONG lParam1,
LONG lParam2
) ;
nStatus1
-------------------
nStatus2 nParam1 nParam2
--------------------------- --------------------- --------------------
lParam1 lParam2
--------------------- ---------------
STATUS1_INIT hWnd hInstance
STATUS1_START
STATUS1_BOOT_SECTOR
STATUS1_DIRECTORY
STATUS1_FAT
STATUS1_SYSTEM_FILE
STATUS1_CYLINDER cylinder percent complete
STATUS1_HEAD
STATUS1_END
STATUS1_ERROR
STATUS2_FILE STATUS3_OPEN_FAIL
file name pointer
STATUS2_FILE STATUS3_OPEN_FILE_IO_ERROR
file name pointer
STATUS2_FILE STATUS3_OPEN_INPUT_BAD
file name pointer
STATUS2_FILE STATUS3_OPEN_FLAGS_BAD
file name pointer
STATUS2_FILE STATUS3_OPEN_NOT_SUPPORTED
file name pointer
STATUS2_READ cylinder head
STATUS2_WRITE cylinder head
STATUS2_FORMAT cylinder head
STATUS2_FILE_READ
file name pointer
STATUS2_FILE_WRITE
file name pointer
STATUS2_DISK_SPACE
space needed space available
STATUS2_HEAD cylinder head
STATUS2_MEMORY
STATUS2_SYSTEM
STATUS2_FAT
STATUS2_DIRECTORY
STATUS2_BOOT_SECTOR
STATUS2_SYSTEM_FILE_MISSING
STATUS2_SYSTEM_FILE_OPEN
STATUS2_COMPARE cylinder head
STATUS2_DPT
>>MDrive
------------------ SABDU001.DLL API: MDrive objects ------------------
A MDrive (Memory Drive) is a specialized version of the VDrive
(Virtual Drive). It is an object that represents a diskette image in
memory.
The following functions are available to manipulate it:
MDriveCreate Creates a MDrive object
MDriveDelete Deletes a MDrive object
MDriveForceReset Issues a reset to the drive
MDriveFormatTrack Formats a track
MDriveReadSectors Reads a group of sectors from the drive
MDriveReset Issues a reset to the drive if it was used
MDriveSetRead Sets up for reading from the drive
MDriveSetWrite Sets up for writing to the drive
MDriveWriteSectors Writes a group of sectors to the drive
>>MDriveCreate
------------------ SABDU001.DLL API: MDriveCreate --------------------
VOID far * FAR PASCAL MDriveCreate (
UINT nMemory,
lpfnHANDLESTATUS lpfnNewHandleStatus
)
Creates a MDrive object associated with identifier nMemory and
returns a pointer to it.
lpfnNewHandleStatus points to a callback routine that handles event
notifications including errors.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1, lpfnHandleStatus ) ;
>>MDriveDelete
------------------ SABDU001.DLL API: MDriveDelete --------------------
VOID FAR PASCAL MDriveDelete (
pMDrive
)
Deletes the MDrive object pointed to by pMDrive.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveDelete ( pDrive1 ) ;
pDrive1 = NULL ;
>>MDriveSetRead
------------------ SABDU001.DLL API: MDriveSetRead -------------------
UINT FAR PASCAL MDriveSetRead (
VOID far *pMDrive,
UINT nTempType,
UINT nCylinders
)
Prepares the MDrive object pointed to by pMDrive for reading.
nTempType defines the type of diskette expected:
FD0360 FD0720 FD1200 FD1440 FD2880
nCylinders defines the number of cylinders.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveSetRead ( pDrive1, FD0360, NULL ) ;
>>MDriveSetWrite
------------------ SABDU001.DLL API: MDriveSetWrite ------------------
UINT FAR PASCAL MDriveSetWrite (
VOID far *pMDrive,
UINT nTempType,
UINT nCylinders
)
Prepares the MDrive object pointed to by pMDrive for writing.
nTempType defines the type of diskette expected:
FD0360 FD0720 FD1200 FD1440 FD2880
nCylinders defines the number of cylinders.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveSetWrite ( pDrive1, FD0360, NULL ) ;
>>MDriveReset
------------------ SABDU001.DLL API: MDriveReset ---------------------
UINT FAR PASCAL MDriveReset (
VOID far *pMDrive
)
Resets the MDrive object pointed to by pMDrive.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveReset ( pDrive1 ) ;
>>MDriveForceReset
------------------ SABDU001.DLL API: MDriveForceReset ----------------
UINT FAR PASCAL MDriveForceReset (
VOID far *pMDrive
)
Resets the MDrive object pointed to by pMDrive.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveForceReset ( pDrive1 ) ;
>>MDriveFormatTrack
------------------ SABDU001.DLL API: MDriveFormatTrack ---------------
UINT FAR PASCAL MDriveForceReset (
VOID far *pMDrive,
UNIT nCylinder,
UNIT nHead
)
Formats the track pointed to by MDrive object pointer
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveFormatTrack ( pDrive1, nCylinder, nHead ) ;
>>MDriveReadSectors
------------------ SABDU001.DLL API: MDriveReadSectors ---------------
UINT FAR PASCAL MDriveReadSectors (
VOID far *pMDrive,
UNIT nCylinder,
UNIT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpcBuffer
)
Reads a group of sectors from the drive pointerd to by pMDrive
nCylinder Cylinder to read from
nHead Head to read with
nSector Starting sector
nCount Number of sectors to read
lpcBuffer Buffer to contain the data read.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveReadSectors ( pDrive1, nCylinder, nHead, nSector,
nCount, lpcBuffer ) ;
>>MDriveWriteSectors
------------------ SABDU001.DLL API: MDriveWriteSectors --------------
UINT FAR PASCAL MDriveWriteSectors (
VOID far *pMDrive,
UNIT nCylinder,
UNIT nHead,
UINT nSector,
UINT nCount,
LPBYTE lpcBuffer
)
Writes a group of sectors from the drive pointerd to by pMDrive
nCylinder Cylinder to read from
nHead Head to read with
nSector Starting sector
nCount Number of sectors to read
lpcBuffer Buffer to contain the data read.
Example:
VOID far *pDrive1 ;
pDrive1 = MDriveCreate ( 1 ) ;
...
MDriveWriteSectors ( pDrive1, nCylinder, nHead, nSector,
nCount, lpcBuffer ) ;
>>VDrive
------------------ SABDU001.DLL API: VDrive objects ------------------
A VDrive (Virtual Drive) is an object that represents a diskette
image.
The following functions are available to manipulate it:
VDriveFlag Returns the flags for the virtual drive
VDriveForceReset Forces a reset of the virtual drive
VDriveFormatTrack Formats a track
VDriveIsRemote Returns TRUE if media is remote
VDriveIsRemovable Returns TRUE if media is removable
VDriveIsUseable Returns TRUE if media is useable
VDriveIsUsed Returns TRUE if virtual drive was used
VDriveLetter Returns letter of vitual drive
VDriveNumberOfCylinders Returns number of cylinders
VDriveNumberOfHeads Returns number of heads
VDriveNumberOfSectors Returns number of sectors
VDriveReadSectors Reads a group of sectors from the vitual drive
VDriveReset Resets the virtual drive if it was used
VDriveSetRead Sets up the virtual drive for reading
VDriveSetType Sets the type (density) of the virtual drive
VDriveSetWrite Sets up the virtual drive for writing
VDriveType Returns the type (density) of the virtual drive
VDriveWriteSectors Writes a group of sectors to the virutal drive
>>VDriveSetType
------------------ SABDU001.DLL API: VDriveSetType -------------------
UINT FAR PASCAL VDriveSetType (
VOID far *pCVDrive,
UINT nType
)
Sets the type (density) for the virtual drive.
nType = FD0360
FD0720
FD1200
FD1200H
FD1440
FD1440H
FD2880
Returns nType if successfull or FD0000 if not.
Example:
VOID far *pDriveA ;
VDriveSetType ( pDriveA, FD0720 ) ;
>>VDriveLetter
------------------ SABDU001.DLL API: VDriveLetter --------------------
char FAR PASCAL VDriveLetter (
VOID far *pCVDrive
)
Returns the drive letter.
Example:
VOID far *pDriveA ;
char cDrive ;
cDrive = VDriveLetter ( pDriveA ) ;
>>VDriveType
------------------ SABDU001.DLL API: VDriveType ----------------------
UINT FAR PASCAL VDriveType (
VOID far *pCVDrive
)
Returns the drive type (density).
Example:
VOID far *pDriveA ;
UINT nType ;
nType = VDriveType ( pDriveA ) ;
>>VDriveFlag
------------------ SABDU001.DLL API: VDriveFlag ----------------------
UINT FAR PASCAL VDriveFlag (
VOID far *pCVDrive
)
Returns the drive flag.
Example:
VOID far *pDriveA ;
UINT nFlag ;
nFlag = VDriveFlag ( pDriveA ) ;
>>VDriveNumberOfCylinders
------------------ SABDU001.DLL API: VDriveNumberOfCylinders ---------
UINT FAR PASCAL VDriveNumberOfCylinders (
VOID far *pCVDrive
)
Returns the number of cylinders.
Example:
VOID far *pDriveA ;
UINT nCylinders ;
nCylinders = VDriveNumberOfCylinders ( pDriveA ) ;
>>VDriveNumberOfHeads
------------------ SABDU001.DLL API: VDriveNumberOfHeads -------------
UINT FAR PASCAL VDriveNumberOfHeads (
VOID far *pCVDrive
)
Returns the number of heads.
Example:
VOID far *pDriveA ;
UINT nHeads ;
nHeads = VDriveNumberOfHeads ( pDriveA ) ;
>>VDriveNumberOfSectors
------------------ SABDU001.DLL API: VDriveNumberOfSectors -----------
UINT FAR PASCAL VDriveNumberOfSectors (
VOID far *pCVDrive
)
Returns the number of sectors.
Example:
VOID far *pDriveA ;
UINT nSectors ;
nSectors = VDriveNumberOfSectors ( pDriveA ) ;
>>VDriveIsRemote
------------------ SABDU001.DLL API: VDriveIsRemote ------------------
BOOL FAR PASCAL VDriveIsRemote (
VOID far *pCVDrive
)
Returns TRUE if the media is remote.
Example:
VOID far *pDriveA ;
BOOL bRemote ;
bRemote = VDriveIsRemote ( pDriveA ) ;
>>VDriveIsRemovable
------------------ SABDU001.DLL API: VDriveIsRemovable ---------------
BOOL FAR PASCAL VDriveIsRemovable (
VOID far *pCVDrive
)
Returns TRUE if the media is removable.
Example:
VOID far *pDriveA ;
BOOL bRemovable ;
bRemovable = VDriveIsRemovable ( pDriveA ) ;
>>VDriveIsUseable
------------------ SABDU001.DLL API: VDriveIsUseable -----------------
BOOL FAR PASCAL VDriveIsUseable (
VOID far *pCVDrive
)
Returns TRUE if the media is useable.
Example:
VOID far *pDriveA ;
BOOL bUseable ;
bUseable = VDriveIsUseable ( pDriveA ) ;
>>VDriveIsUsed
------------------ SABDU001.DLL API: VDriveIsUsed --------------------
BOOL FAR PASCAL VDriveIsUsead (
VOID far *pCVDrive
)
Returns TRUE if the media is used.
Example:
VOID far *pDriveA ;
BOOL bUsed ;
bUsed = VDriveIsUsed ( pDriveA ) ;
>>VDriveReset
------------------ SABDU001.DLL API: VDriveReset ---------------------
UINT FAR PASCAL VDriveReset (
VOID far *pCVDrive
)
Returns FALSE if successfull.
Example:
VOID far *pDriveA ;
BOOL bReset ;
bReset = !VDriveReset ( pDriveA ) ;
>>VDriveFormatTrack
------------------ SABDU001.DLL API: VDriveFormatTrack ---------------
UINT FAR PASCAL VDriveFormatTrack (
VOID far *pCVDrive,
UINT nCylinder,
UINT nHead
)
Returns FALSE if successfull.
Example:
VOID far *pDriveA ;
BOOL bFormat ;
bFormat = !VDriveFormatTrack ( pDriveA, nCylinder, nHead ) ;
>>VDriveReadSectors
------------------ SABDU001.DLL API: VDriveReadSectors ---------------
UINT FAR PASCAL VDriveReadSectors (
VOID far *pCVDrive,
UINT nCylinder,
UINT nHead
)
Returns FALSE if successfull.
Example:
VOID far *pDriveA ;
BOOL bRead ;
bRead = !VDriveReadSectors ( pDriveA, nCylinder, nHead,
nSector, nCount, LPBYTE lpcBuffer ) ;
>>VDriveWriteSectors
------------------ SABDU001.DLL API: VDriveWriteSectors --------------
UINT FAR PASCAL VDriveWriteSectors (
VOID far *pCVDrive,
UINT nCylinder,
UINT nHead
)
Returns FALSE if successfull.
Example:
VOID far *pDriveA ;
BOOL bWrite ;
bWrite = !VDriveWriteSectors ( pDriveA, nCylinder, nHead,
nSector, nCount, LPBYTE lpcBuffer ) ;